package com.twu.biblioteca.Data;

/**
 * User: haruo
 * Date: 5/30/13
 */
public enum Options {
    CHECK_MEMBERSHIP,
    EXIT_BIBLIOTECA,
    INVALID_OPTION,
    LIST_BOOKS,
    LIST_MOVIES,
    LOGIN,
    RESERVE_BOOK;

    public static Options convertToOption(String code) {
        if (code.equals("1")) {
            return LIST_BOOKS;
        } else if (code.equals("2")) {
            return LIST_MOVIES;
        } else if (code.equals("3")) {
            return RESERVE_BOOK;
        } else if (code.equals("4")) {
            return CHECK_MEMBERSHIP;
        } else if (code.equals("5")) {
            return LOGIN;
        } else if (code.equals("0")) {
            return EXIT_BIBLIOTECA;
        } else {
            return INVALID_OPTION;
        }

    }
}
